package com.ruoyi.recycle.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.recycle.domain.ClientUserManagement;
import com.ruoyi.recycle.domain.RecycleCommodity;
import com.ruoyi.recycle.domain.RecycleOrder;
import com.ruoyi.recycle.dto.KuaiDiResultDto;
import com.ruoyi.recycle.dto.RecycleOrderDTO;
import com.ruoyi.recycle.dto.deppon.request.JsonRootBean;
import com.ruoyi.recycle.dto.deppon.response.SynchronousDeBangStatus;
import com.ruoyi.recycle.vo.ClientServeOrderVO;
import com.ruoyi.recycle.vo.RecycleOrderVO;
import org.json.JSONObject;
import org.springframework.util.MultiValueMap;

import java.math.BigDecimal;
import java.util.List;

/**
 * 回收订单Service接口
 *
 * @author ruoyi
 * @date 2022-05-22
 */
public interface IRecycleOrderService extends IService<RecycleOrder> {
    /**
     * 查询回收订单
     *
     * @param recycleOrderNo 回收订单主键
     * @return 回收订单
     */
    public RecycleOrderVO selectRecycleOrderById(String recycleOrderNo);

    /**
     * 查询回收订单列表
     *
     * @param recycleOrder 回收订单
     * @return 回收订单集合
     */
    public List<RecycleOrder> selectRecycleOrderList(RecycleOrder recycleOrder);

    /**
     * 新增回收订单
     *
     * @param recycleOrder 回收订单
     * @return 结果
     */
    public int insertRecycleOrder(RecycleOrder recycleOrder);

    /**
     * 修改回收订单
     *
     * @param recycleOrder 回收订单
     * @return 结果
     */
    public int updateRecycleOrder(RecycleOrder recycleOrder);

    /**
     * 批量删除回收订单
     *
     * @param recycleOrderNos 需要删除的回收订单主键集合
     * @return 结果
     */
    public int deleteRecycleOrderByIds(String[] recycleOrderNos);

    /**
     * 删除回收订单信息
     *
     * @param recycleOrderNo 回收订单主键
     * @return 结果
     */
    public int deleteRecycleOrderById(String recycleOrderNo);

    /**
     * 补充回收物品详细
     * @param recycleOrderNo
     * @return
     */
    List<RecycleCommodity> selectRecycleOrderDetailById(String recycleOrderNo);

    AjaxResult addClientServeOrder(ClientServeOrderVO clientServeOrderVO);

    void updateRecycleCommodityList(List<RecycleCommodity> recycleCommodityList);

    SynchronousDeBangStatus expressageCallback(MultiValueMap<String, String> formData);

    AjaxResult confirmReceipt(String orderId);

    void shareOutBonus(RecycleOrder recycleOrder, ClientUserManagement clientUserManagement);

    AjaxResult culateRecycleOrderIntegral(List<RecycleCommodity> recycleCommodityList);

    BigDecimal sumFinishedOrder(LambdaQueryWrapper<RecycleOrder> wrapper);

    AjaxResult miniClientGetClientRecycleOrder(RecycleOrderDTO queryDTO);

    AjaxResult wbkTest(JsonRootBean sendJson);

    IPage<RecycleOrderVO> selectOrderPage(RecycleOrderDTO queryDTO)throws Exception;

    AjaxResult recycleOrderTotalMoney(RecycleOrderDTO queryDTO);
}
